package com.hsgene.user.service.api;

import com.hsgene.common.util.result.ApiResult;
import com.hsgene.user.dto.sms.MessageInfoDto;
import com.hsgene.user.service.api.impl.MessageServiceImpl;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 短信服务
 *
 * @author wangbing
 * @version 1.0, 2018/7/10
 */
@FeignClient(name = "ms-mod-message", path = "/message/send", fallback = MessageServiceImpl.class)
public interface MessageService {

    /**
     * 发送短信
     *
     * @param msgContent 短信内容
     * @param phones     接收方号码，多个以","分隔
     * @return 发送结果
     */
    @GetMapping("")
    ApiResult<MessageInfoDto> sendMessage(
            @RequestParam("msgContent") String msgContent,
            @RequestParam("phones") String phones);
}
